package com.ucode.tool.base;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 正则表达式常量
 * @author: liliang
 * @date: 2020年3月6日 下午12:43:24
 */
public class UcodeRegexConstants {

    /**
     * 邮箱
     */
    public static String email_pattern = "\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+[A-Za-z]{2,14}";
    /**
     * URL
     */
    public static String url_pattern = "^((https|http|ftp|rtsp|mms)?:\\/\\/)[^\\s]+";

    /**
     * 手机号码(国内)
     */
    public static String mobile_pattern = "^(1[3-9])\\d{9}$";
    
    /**
     * 电话号码(国内)
     */
    public static String telephone_pattern = "[0-9-()（）]{7,18}";
    /**
     * 腾讯QQ
     */
    public static String pattern = "[1-9]([0-9]{5,11})";


    public static void main(String[] args) {
        Pattern r = Pattern.compile(telephone_pattern);
        Matcher m = r.matcher("35465765767");
        System.out.println(m.matches());
    }

}
